package org.nlp2rdf.navigator.junit;

import org.dllearner.utilities.experiments.Examples;
import org.junit.Test;
import org.nlp2rdf.navigator.client.common.ClassificationResultDTO;
import org.nlp2rdf.navigator.client.common.LearnedConceptDTO;
import org.nlp2rdf.navigator.client.exception.NKEConceptParseException;
import org.nlp2rdf.navigator.client.exception.NKELearningException;
import org.nlp2rdf.navigator.client.exception.NKEQueryException;
import org.nlp2rdf.navigator.client.exception.NKERuntimeException;

public class EKAW {
	@Test
	public void dbpediaTest() throws NKELearningException,  NKEQueryException, NKEConceptParseException, NKERuntimeException{
		
		Examples ex = new Examples();
		ex.addPosTrain("http://dbpedia.org/resource/Catania");
		ex.addPosTrain("http://dbpedia.org/resource/Prague");
		ex.addPosTrain("http://dbpedia.org/resource/Lisbon");
		
		
		ex.addNegTrain("http://dbpedia.org/resource/Karlsruhe");
		ex.addNegTrain("http://dbpedia.org/resource/Washington%2C_D.C.");
		ex.addNegTrain("http://dbpedia.org/resource/Shanghai");
//		ex.addNegTrain("http://dbpedia.org/resource/Catania");
//		ex.addNegTrain("http://dbpedia.org/resource/Prague");
//		ex.addNegTrain("http://dbpedia.org/resource/Lisbon");
//		
//		
//		ex.addPosTrain("http://dbpedia.org/resource/Karlsruhe");
//		ex.addPosTrain("http://dbpedia.org/resource/Washington%2C_D.C.");
//		ex.addPosTrain("http://dbpedia.org/resource/Shanghai");
		
		LearnedConceptDTO d = Util.dbpedia.learn(ex);
//		assertTrue(d.getKbSyntaxString().contains("http://nlp2rdf.org/ontology/Sentence"));
//		assertTrue(d.getAccuracy() == 1.0);
		System.out.println(d);
		ClassificationResultDTO c = Util.dbpedia.classify(d.getKbSyntaxString(), 10, 0);
		System.out.println(c.toFullString());
		
	}
}
